home *** CD-ROM | disk | FTP | other *** search
/ The Big Day - Work Smarter - Learn How / The Big Day - Work Smarter - Learn How (Microsoft).BIN / Trivia_files / script.js < prev    next >
Encoding:
Text File  |  2001-02-06  |  30.2 KB  |  1,120 lines

  1.  
  2. function LoadSld( slideId )
  3. {
  4.     if( !g_supportsPPTHTML ) return
  5.     if( slideId )
  6.         parent.SldUpdated(slideId)
  7.     g_origSz=parseInt(SlideObj.style.fontSize)
  8.     g_origH=SlideObj.style.posHeight
  9.     g_origW=SlideObj.style.posWidth
  10.     g_scaleHyperlinks=(document.all.tags("AREA").length>0)
  11.     if( g_scaleHyperlinks )
  12.         InitHLinkArray()
  13.     if( g_scaleInFrame||(IsWin("PPTSld") && parent.IsFullScrMode() ) )
  14.         document.body.scroll="no"
  15.     _RSW()
  16.     if( IsWin("PPTSld") && parent.IsFullScrMode() )    {
  17.         document.oncontextmenu=parent._CM;
  18.         self.focus()
  19.     }
  20. }
  21. function MakeSldVis( fTrans ) 
  22. {
  23.     fTrans=fTrans && g_showAnimation
  24.     if( fTrans )
  25.     {
  26.         if( g_bgSound ) {
  27.             idx=g_bgSound.indexOf(",");
  28.             pptSound.src=g_bgSound.substr( 0, idx );
  29.             pptSound.loop= -(parseInt(g_bgSound.substr(idx+1)));
  30.         }
  31.         SlideObj.filters.revealtrans.Apply()
  32.     }
  33.     SlideObj.style.visibility="visible"
  34.     if( fTrans )
  35.         SlideObj.filters.revealtrans.Play()
  36. }
  37. function MakeNotesVis() 
  38. {
  39.     if( !IsNts() ) return false 
  40.     SlideObj.style.display="none"
  41.     nObj = document.all.item("NotesObj")
  42.     parent.SetHasNts(0)
  43.     if( nObj ) { 
  44.         nObj.style.display=""
  45.         parent.SetHasNts(1)
  46.     }
  47.     return 1
  48. }
  49. function Redirect( frmId,sId )
  50. {
  51.     var str=document.location.hash,idx=str.indexOf('#')
  52.     if(idx>=0) str=str.substr(1);
  53.     if( window.name != frmId && ( sId != str) ) {
  54.         obj = document.all.item("Main-File")
  55.         window.location.href=obj.href+"#"+sId
  56.         return 1
  57.     }
  58.     return 0
  59. }
  60. function HideMenu() { if( frames["PPTSld"] && PPTSld.document.all.item("ctxtmenu") && PPTSld.ctxtmenu.style.display!="none" ) { PPTSld.ctxtmenu.style.display='none'; return true } return false }
  61. function IsWin( name ) { return window.name == name }
  62. function IsNts() { return IsWin("PPTNts") }
  63. function IsSldOrNts() { return( IsWin("PPTSld")||IsWin("PPTNts") ) }
  64. function SupportsPPTAnimation() { return( navigator.platform == "Win32" && navigator.appVersion.indexOf("Windows")>0 ) }
  65. function SupportsPPTHTML()
  66. {
  67.     var appVer=navigator.appVersion, msie=appVer.indexOf("MSIE "), ver=0
  68.     if( msie >= 0 )
  69.         ver=parseFloat( appVer.substring( msie+5, appVer.indexOf(";",msie) ) )
  70.     else
  71.         ver=parseInt(appVer)
  72.  
  73.     return( ver >= 4 && msie >= 0 )
  74. }
  75. var MHTMLPrefix = CalculateMHTMLPrefix(); 
  76. function CalculateMHTMLPrefix()
  77. {
  78.     if ( document.location.protocol == 'mhtml:') { 
  79.         href=new String(document.location.href) 
  80.         Start=href.indexOf('!')+1 
  81.         End=href.lastIndexOf('/')+1 
  82.         if (End < Start) 
  83.             return href.substring(0, Start) 
  84.         else 
  85.         return href.substring(0, End) 
  86.     }
  87.     return '';
  88. }
  89.  
  90. function _RSW()
  91. {
  92.     if( !g_supportsPPTHTML || IsNts() ||
  93.       ( !g_scaleInFrame && (( window.name != "PPTSld" ) || !parent.IsFullScrMode()) ) )
  94.         return
  95.  
  96.     cltWidth=document.body.clientWidth
  97.     cltHeight=document.body.clientHeight
  98.     factor=(1.0*cltWidth)/g_origW
  99.     if( cltHeight < g_origH*factor )
  100.         factor=(1.0*cltHeight)/g_origH
  101.  
  102.     newSize = g_origSz * factor
  103.     if( newSize < 1 ) newSize=1
  104.  
  105.     s=SlideObj.style
  106.     s.fontSize=newSize+"px"
  107.     s.posWidth=g_origW*factor
  108.     s.posHeight=g_origH*factor
  109.     s.posLeft=(cltWidth-s.posWidth)/2
  110.     s.posTop=(cltHeight-s.posHeight)/2
  111.  
  112.     if( g_scaleHyperlinks )
  113.         ScaleHyperlinks( factor )
  114. }
  115.  
  116. function _KPH()
  117.   if( IsNts() ) return;
  118.  
  119.   if( !parent.IsFramesMode() && event.keyCode == 27 && !parent.HideMenu() )
  120.     parent.window.close( self );
  121.   else if( event.keyCode == 32 )
  122.   {
  123.     if( window.name == "PPTSld" )
  124.       parent.PPTSld.DocumentOnClick();
  125.     else
  126.       parent.GoToNextSld();
  127.   }
  128. }
  129.  
  130. function PlaySound( href, loop ){
  131.     href= unescape(href);
  132.     if( window.event ) window.event.cancelBubble = true;
  133.     pptSound.src = href;
  134.     pptSound.loop = loop ? -1 : 0;
  135. }
  136. var AE_NONE = 0, AE_DIM = 1, AE_HIDE = 2, AE_HIDEIMDTLY = 3, LONG_INTERVAL = 10, SHORT_INTERVAL = 5, g_curAnim = null, g_vml = 0;
  137. function ParseAnimations(){
  138.     nr = document.all.tags("DIV").length;
  139.     while(nr > 0) {
  140.         rObj = document.all.tags("DIV").item(--nr);
  141.         if(rObj.style.cssText != null) {
  142.             build = rObj.style.cssText.indexOf("mso-build");
  143.             if(build >= 0)
  144.                 AddAnimation(rObj);
  145.         }
  146.     }
  147.     if(g_autoTrans){
  148.         totT=0, autoAnims=0;
  149.         rAnims=g_animManager.m_anims;
  150.         nBuilds=g_animManager.m_numBuilds;
  151.         for(x=nBuilds;x>0;x--)
  152.         if(-1 != rAnims[x].m_secs){
  153.             totT+=rAnims[x].m_secs;
  154.             autoAnims++;
  155.         }
  156.         time=g_transSecs-totT;
  157.         if(time<0) time=0;
  158.         time=time/(nBuilds-autoAnims+1);
  159.         for(x=nBuilds;x>0;x--)
  160.             if(-1 == rAnims[x].m_secs)
  161.                 rAnims[x].m_secs=time;
  162.     }
  163. }
  164. function AddAnimation(rObj){
  165.     a =new Animation();
  166.     a.m_obj =rObj;
  167.     a.m_oldc =rObj.color;
  168.     GetVal=rObj.style.getAttribute;
  169.     var t;
  170.     if( t=GetVal("mso-build") ) a.m_build=t-0;
  171.     if( t=GetVal("mso-build-after-action") ) a.m_aAct=t-0;
  172.     if( t=GetVal("mso-build-after-color") ) a.m_oldc=t;
  173.     if( t=GetVal("mso-build-auto-secs") ) a.m_secs=t-0;
  174.     if( t=GetVal("mso-build-avi") ) a.m_video=t;
  175.     if( t=GetVal("mso-build-dual-id") ) a.m_dId=t;
  176.     if( t=GetVal("mso-build-order") ) a.m_order=t-0;
  177.     if( t=GetVal("mso-build-sound-name") ) a.m_sound=t;
  178.  
  179.     g_animManager.AddAnimation(a);
  180. }
  181. function ShowVGXObj(rObj){
  182.     vmlId=null,ImgTag=null;
  183.     curObj=rObj;
  184.     sObj =document.all.item("SlideObj");
  185.     while(null == ImgTag && null != curObj && sObj != curObj){
  186.         ImgTag =curObj.children.tags("IMG").item(0);
  187.         curObj =(curObj.parentElement.tagName == "DIV") ? curObj.parentElement : null
  188.     }
  189.     if(null !=ImgTag)
  190.         vmlId =ImgTag.getAttribute("v:shapes");
  191.     if(null !=vmlId) {
  192.         idx =vmlId.indexOf(",");
  193.         if(idx > 0) vmlId =vmlId.substr(0, idx);
  194.         vgxObj =document.all.item(vmlId);
  195.         if((null != vgxObj) && (null != vgxObj.parentElement) && (vgxObj.parentElement.style.display != "none")){
  196.             vgxObj.parentElement.style.visibility = "visible";
  197.             ImgTag.style.visibility = "hidden";
  198.         }
  199.         else
  200.             rObj.style.visibility = "visible";
  201.     }
  202. }
  203. function AnimationManager(){
  204.     t=this;
  205.     t.m_anims=new Array();
  206.     t.m_numBuilds=0;
  207.     t.m_activeObj=null;
  208.     t.m_curBuild=1;
  209.     t.m_timer=-1;
  210.     t.m_objToHide=null;
  211.     t.m_objToDim=null;
  212.     t.m_colorToDim=-1;
  213.     t.m_isPlaying=0;
  214.     t.m_autoTimer=-1;
  215.     t.Peek=AM_Peek;
  216.     t.Next=AM_Next;
  217.     t.Previous=AM_Previous;
  218.     t.AddAnimation=AM_AddAnimation;
  219.     t.ShowShapes=AM_ShowShapes;
  220.     t.Swap=AM_Swap;
  221. }
  222. function AM_ShowShapes(){
  223.     for(x=this.m_numBuilds; x>0; x--){
  224.         if(g_vml)
  225.             ShowVGXObj(this.m_anims[x].m_obj);
  226.         aObj =this.m_anims[x].m_obj;
  227.         if(aObj)
  228.             aObj.style.visibility = "visible";
  229.     }
  230.     this.m_numBuilds =0;
  231. }
  232. function AM_Swap(cur){
  233.     rList =this.m_anims;
  234.     t =rList[cur+1];
  235.     rList[cur+1] =rList[cur];
  236.     rList[cur] =t;
  237. }
  238. function AM_AddAnimation(a){
  239.     this.m_anims[++this.m_numBuilds] = a;
  240.     this.m_curBuild =this.m_numBuilds;
  241.     cur =this.m_numBuilds;
  242.     if(a.m_order > 0){
  243.         while(cur-- > 1 && Math.abs(this.m_anims[cur+1].m_order) > Math.abs(this.m_anims[cur].m_order))
  244.             this.Swap(cur);
  245.     }
  246.     else {
  247.         while(cur-- > 1 && Math.abs(this.m_anims[cur+1].m_order) >= Math.abs(this.m_anims[cur].m_order))
  248.             this.Swap(cur);
  249.     }
  250. }
  251. function AM_Peek(){
  252.     if(g_animManager.m_curBuild > 0 && 0 < g_animManager.m_numBuilds) {
  253.         secs =g_animManager.m_anims[g_animManager.m_curBuild].m_secs;
  254.         if(secs != -1)
  255.             g_animManager.m_autoTimer = window.setTimeout("_DocAction()", secs);
  256.     }
  257.     else if(1 == g_autoTrans && IsWin("PPTSld") && !parent.IsFramesMode()){
  258.         setTimeout("parent.GoToNextSld()", g_transSecs);
  259.     }
  260. }
  261. function AM_Next(){
  262.     if(0 == this.m_numBuilds || (g_curAnim != null)) return 0; 
  263.     success=0;
  264.     if(this.m_autoTimer != -1)
  265.         window.clearTimeout(this.m_autoTimer);
  266.     if(this.m_objToHide != null)
  267.         this.m_objToHide.style.visibility = "hidden";
  268.     if(this.m_objToDim != null) {
  269.         nr = document.all.length;
  270.         while(nr-- > 0) {
  271.             rObj =document.all.item(nr);
  272.             if(this.m_objToDim.contains(rObj))
  273.                 rObj.style.color = this.m_colorToDim;
  274.         }
  275.     }
  276.     if(this.m_curBuild > 0) {
  277.         this.m_activeObj =this.m_anims[this.m_curBuild--];
  278.         this.m_activeObj.Start();
  279.         success =1;
  280.     }
  281.     return success;
  282. }
  283. function AM_Previous(){
  284.     if((null == g_curAnim) && (this.m_curBuild <= this.m_numBuilds)) {
  285.         this.m_curBuild++;
  286.         var animObj = this.m_anims[this.m_curBuild];
  287.         if(this.m_curBuild >= 1)
  288.             animObj.m_obj.style.visibility = "hidden";
  289.     }
  290. }
  291. function InitBuildEffects(){
  292.     g_animManager =new AnimationManager();
  293.     ParseAnimations();
  294.     isFullScreen =(window.name == "PPTSld") && !parent.IsFramesMode();
  295.     if(!g_showAnimation || (isFullScreen && parent.IsSldVisited()))
  296.         g_animManager.ShowShapes();
  297.     else if(!g_hasTrans)
  298.         g_animManager.Peek();
  299.     if(isFullScreen && !g_isKiosk)
  300.         parent.SetSldVisited();
  301. }
  302. function Animation(){
  303.     t=this;
  304.     t.m_obj=0;
  305.     t.m_build=0;
  306.     t.m_dId="";
  307.     t.m_aAct=0;
  308.     t.m_secs=-1;
  309.     t.m_order=0;
  310.     t.m_sound="";
  311.     t.m_oldc=0;
  312.     t.m_video="";
  313.     t.m_animObj=0; 
  314.     t.m_timer=-1;
  315.     t.m_steps=0;
  316.     t.m_finalL=0;
  317.     t.m_finalT=0;
  318.     t.m_finalW=0;
  319.     t.m_finalH=0;
  320.     t.Start=A_Start;
  321.     t.End=A_End;
  322.     t.Animate=A_Animate;
  323.     t.SetupMove=A_SetupMove;
  324.     t.DoMove=A_DoMove;
  325.     t.DoSpiral=A_DoSpiral;
  326.     t.DoSwivel=A_DoSwivel;
  327.     t.DoInplace=A_DoInplace;
  328. }
  329. function TickHandler(){
  330.     if(null != g_curAnim) g_curAnim.Animate();
  331. }
  332. function GetAnimClass(dir){
  333.     if(dir > 99) return 7; 
  334.     else if(dir > 28) return 5; 
  335.     else if(dir == 27) return 4; 
  336.     else if(dir == 28) return 3; 
  337.     else if((dir >= 12) && (dir < 16))return 2; 
  338.     else return 1; 
  339. }
  340. function GetSteps(dir){
  341.     animClass =GetAnimClass(dir);
  342.     if(animClass == 5 || animClass == 7) return 1; 
  343.     res=12;
  344.     if(animClass >= 2 && animClass <= 4) res = 50;
  345.     if(SlideObj.style.backgroundImage != "") res /= 2;
  346.     return res;
  347. }
  348. function A_Start(){
  349.     g_curAnim = this;
  350.     this.SetupMove();
  351.     if(this.m_sound)
  352.         PlaySound(this.m_sound, false);
  353.     animClass =GetAnimClass(this.m_build);
  354.     if(5 == animClass)
  355.         this.DoInplace();
  356.     else {
  357.         this.m_animObj.style.visibility = "visible";
  358.         time = 0;
  359.         if(7 == animClass) { // Appear and flash
  360.             switch(this.m_build) {
  361.                 case 100: time = 300; break;
  362.                 case 101:
  363.                 case 200: time = 500; break;
  364.                 case 102: time = 1000; break;
  365.             }
  366.             if(this.m_build < 200)
  367.                 this.m_aAct = AE_HIDEIMDTLY;
  368.         }
  369.         else
  370.             time =(animClass % 2 == 0) ? LONG_INTERVAL : SHORT_INTERVAL;
  371.         this.m_timer =window.setInterval("TickHandler()", time);
  372.     }
  373. }
  374. function A_End(){
  375.     window.clearInterval(this.m_timer);
  376.     if(this.m_video != "")
  377.         PlayMedia(this.m_video);
  378.     rStyle = this.m_obj.style;
  379.     if(this.m_dId == ""){
  380.         rStyle.pixelLeft =this.m_finalL;
  381.         rStyle.pixelTop =this.m_finalT;
  382.         rStyle.pixelWidth    =this.m_finalW;
  383.         rStyle.pixelHeight =this.m_finalH;
  384.     }
  385.     else {
  386.         if(this.m_aAct != AE_HIDEIMDTLY)
  387.             rStyle.visibility = "visible";
  388.         this.m_animObj.style.visibility = "hidden";
  389.     }
  390.     switch(this.m_aAct){
  391.         case AE_NONE: 
  392.             if(g_vml)
  393.                 ShowVGXObj(this.m_obj);
  394.             break;
  395.         case AE_DIM:
  396.             if(g_vml)
  397.                 ShowVGXObj(this.m_obj);
  398.             g_animManager.m_objToDim    =this.m_obj;
  399.             g_animManager.m_colorToDim    =this.m_oldc;
  400.             break;
  401.         case AE_HIDE:
  402.             g_animManager.m_objToHide    =this.m_obj;
  403.             break;
  404.         case AE_HIDEIMDTLY:
  405.             rStyle.visibility ="hidden";
  406.             break;
  407.     }
  408.     if(this.m_dId != "")
  409.         this.m_animObj.style.visibility ="hidden";
  410.     if(!g_animManager.m_isPlaying){
  411.         g_curAnim = null;
  412.         this.m_obj = null;
  413.         g_animManager.Peek();
  414.     }
  415. }
  416. function A_Animate(){
  417.     switch(GetAnimClass(this.m_build)) {
  418.         case 1:
  419.         case 2: this.DoMove();    break;
  420.         case 3: this.DoSpiral();    break;
  421.         case 4: this.DoSwivel();    break;
  422.     }
  423.     if(--this.m_steps == 0) 
  424.         this.End();
  425. }
  426. function A_SetupMove(){
  427.     dir =this.m_build;
  428.     this.m_steps =GetSteps(dir);
  429.     rObj =this.m_dId != "" ? document.all.item(this.m_dId) : this.m_obj;
  430.     this.m_animObj =rObj;
  431.     offsetL=0;
  432.     offsetT=0;
  433.     parentObj=rObj.parentElement;
  434.     while(parentObj.tagName != "BODY" && parentObj.id != "SlideObj"){
  435.         offsetL    +=parentObj.offsetLeft;
  436.         offsetT    +=parentObj.offsetTop;
  437.         parentObj =parentObj.parentElement; 
  438.     }
  439.     rStyle = rObj.style;
  440.     this.m_finalL =sLeft =rStyle.pixelLeft;
  441.     this.m_finalT =sTop =rStyle.pixelTop;
  442.     this.m_finalW =sWidth =rStyle.pixelWidth;
  443.     this.m_finalH =sHeight =rStyle.pixelHeight;
  444.     clientW=SlideObj.style.pixelWidth-offsetL;
  445.     clientH=SlideObj.style.pixelHeight-offsetT;
  446.      if(dir < 100) {
  447.         switch(dir) {
  448.             case 0: case 12: sLeft=-(sWidth+offsetL); break;
  449.             case 1: case 13: sTop=-(sHeight+offsetT);    break;
  450.             case 2: case 14: sLeft=clientW; break;
  451.             case 3: case 15: sTop=clientH; break;
  452.             case 4: 
  453.                 sLeft=-(sWidth+offsetL); 
  454.                 sTop=-(sHeight+offsetT); 
  455.                 break;
  456.             case 5: 
  457.                 sLeft=clientW; 
  458.                 sTop=-(sHeight+offsetT); 
  459.                 break;
  460.             case 6: 
  461.                 sLeft=-(sWidth+offsetL); 
  462.                 sTop=clientH; 
  463.                 break;
  464.             case 7: 
  465.                 sLeft=clientW; 
  466.                 sTop=clientH; 
  467.                 break;
  468.             case 8: sLeft-=sWidth; break;
  469.             case 9: sTop+=sHeight; break;
  470.             case 10: sLeft+=sWidth; break;
  471.             case 11: sTop-=sHeight; break;
  472.             case 16:
  473.                 sLeft+=sWidth/2;
  474.                 sTop+=sHeight/2;
  475.                 sWidth=0;
  476.                 sHeight=0;
  477.                 break;
  478.             case 17:
  479.                 sLeft+=sWidth/6;
  480.                 sTop+=sHeight/6;
  481.                 sWidth=sWidth*2/3;
  482.                 sHeight=sHeight*2/3;
  483.                 break;
  484.             case 18:
  485.                 sLeft-=(3*sWidth)/2;
  486.                 sTop-=(3*sHeight)/2;
  487.                 sWidth=sWidth*4;
  488.                 sHeight=sHeight*4;
  489.                 break;
  490.             case 19:
  491.                 sLeft-=sWidth/6;
  492.                 sTop-=sHeight/6;
  493.                 sWidth=sWidth*4/3;
  494.                 sHeight=sHeight*4/3;
  495.                 break;
  496.             case 20:
  497.                 sLeft=clientW/2;
  498.                 sTop=clientH/2;
  499.                 sWidth=0;
  500.                 sHeight=0;
  501.                 break;
  502.             case 21:
  503.                 sLeft= 0; 
  504.                 sTop=clientH; 
  505.                 sWidth=clientW; 
  506.                 sHeight=clientH;
  507.                 break;
  508.             case 22:
  509.                 sLeft+=sWidth/2;
  510.                 sWidth=0;
  511.                 break;
  512.             case 23: sWidth=0; break;
  513.             case 24: sHeight=0; break;
  514.             case 25:
  515.                 sLeft+=sWidth;
  516.                 sWidth=0;
  517.                 break;
  518.             case 26:
  519.                 sTop+=sHeight;
  520.                 sHeight=0;
  521.                 break;
  522.             case 27:
  523.                 sLeft+=sWidth/2;
  524.                 sWidth=0;
  525.                 break;
  526.             case 28:
  527.                 sLeft=0;
  528.                 sTop=clientH;
  529.                 sWidth=0;
  530.                 sHeight=0;
  531.                 break;
  532.         }
  533.     }
  534.     if(0 == sWidth) 
  535.         sWidth++;
  536.     rStyle.pixelLeft=sLeft;
  537.     rStyle.pixelTop=sTop;
  538.     rStyle.pixelWidth=sWidth;
  539.     rStyle.pixelHeight=sHeight;
  540. }
  541. function A_DoInplace(){
  542.     if(this.m_animObj.filters.revealtrans){
  543.         this.m_animObj.filters.revealtrans.Apply();
  544.         this.m_animObj.style.visibility ="visible";
  545.         this.m_animObj.filters.revealtrans.Play();
  546.     }
  547. }
  548. function A_DoMove(){
  549.     rStyle = this.m_animObj.style;
  550.     rStyle.pixelLeft +=(this.m_finalL - rStyle.pixelLeft)/this.m_steps;
  551.     rStyle.pixelTop +=(this.m_finalT - rStyle.pixelTop)/this.m_steps;
  552.     rStyle.pixelWidth +=(this.m_finalW - rStyle.pixelWidth)/this.m_steps;
  553.     rStyle.pixelHeight +=(this.m_finalH - rStyle.pixelHeight)/this.m_steps;
  554. function A_DoSpiral(){
  555.     ratio =this.m_steps / GetSteps(this.m_build);
  556.     angle =2*ratio*3.14;
  557.     cosa =Math.cos(angle);
  558.     sina =Math.sin(angle);
  559.     vx =(this.m_finalL + this.m_finalW / 2)*ratio;
  560.     vy =(this.m_finalT + this.m_finalH / 2 - SlideObj.style.pixelHeight) * ratio;
  561.     rStyle =this.m_animObj.style;
  562.     rStyle.pixelLeft =this.m_finalL - vx * cosa - vy * sina;
  563.     rStyle.pixelTop =this.m_finalT + vx * sina - vy * cosa;
  564.     rStyle.pixelWidth =this.m_finalW * (1 - ratio);
  565.     rStyle.pixelHeight =this.m_finalH * (1 - ratio);
  566. }
  567. function A_DoSwivel(){
  568.     rStyle =this.m_animObj.style;
  569.     angle =this.m_steps / GetSteps(this.m_build) * 5 * 3.14 / 2;
  570.     difX =Math.abs(this.m_finalW * Math.cos(angle));
  571.     rStyle.pixelLeft =this.m_finalL + (this.m_finalW - difX) / 2;
  572.     if(0 == difX) difX++;
  573.     rStyle.pixelWidth =difX;
  574. }
  575. function DocumentOnClick()
  576. {
  577.     if( IsNts() || parent.HideMenu() ) return
  578.     _DocAction()
  579. }
  580. function _DocAction()
  581. {
  582.     if( g_animManager && g_animManager.m_isPlaying && g_curAnim )
  583.         StopMedia( g_curAnim.m_video );
  584.  
  585.     if( ( g_showAnimation && !g_curAnim && 
  586.         g_animManager && g_animManager.Next() ) )
  587.         return;
  588.  
  589.     if( ( g_allowAdvOnClick && (window.name=="PPTSld") && !parent.IsFramesMode() && 
  590.         !g_curAnim ) || (!g_curAnim && event && event.keyCode==32) )
  591.         parent.GoToNextSld();
  592. }
  593.  
  594.  
  595. var g_supportsPPTHTML = SupportsPPTHTML(), g_scaleInFrame = true, gId="", g_bgSound="",
  596.     g_scaleHyperlinks = false, g_allowAdvOnClick = true, g_showInBrowser = false;
  597. var g_showAnimation = g_supportsPPTHTML && SupportsPPTAnimation() && ( (window.name=="PPTSld" && !parent.IsFramesMode()) || g_showInBrowser );var g_hasTrans = false, g_autoTrans = false, g_transSecs = 0;
  598. var g_isKiosk = 0;var g_animManager = null;
  599.  
  600. var ENDSHOW_MESG="End of slide show, click to exit.", SCREEN_MODE="Frames", gIsEndShow=0, NUM_VIS_SLDS=55, SCRIPT_HREF="script.js", FULLSCR_HREF="fullscreen.htm";
  601. var gCurSld = gPrevSld = 1, g_offset = 0, gNtsOpen = gHasNts = gOtlTxtExp = gNarrationPaused = false, gOtlOpen = true
  602. window.gPPTHTML=SupportsPPTHTML()
  603.  
  604. function UpdNtsPane(){ PPTNts.location.replace( MHTMLPrefix+GetHrefObj( gCurSld ).mNtsHref ) }
  605. function UpdNavPane( sldIndex ){ if(gNavLoaded) PPTNav.UpdNav() }
  606. function UpdOtNavPane(){ if(gOtlNavLoaded) PPTOtlNav.UpdOtlNav() }
  607. function UpdOtlPane(){ if(gOtlLoaded) PPTOtl.UpdOtl() }
  608. function SetHasNts( fVal )
  609. {
  610.     if( gHasNts != fVal ) {
  611.         gHasNts=fVal
  612.         UpdNavPane()
  613.     }
  614. }
  615. function ToggleOtlText()
  616. {
  617.     gOtlTxtExp=!gOtlTxtExp
  618.     UpdOtlPane()
  619. }
  620. function ToggleOtlPane()
  621. {
  622.     frmset=document.all("PPTHorizAdjust")
  623.     frm=document.all("PPTOtl")
  624.  
  625.     if( gOtlOpen )
  626.         frmset.cols="*,100%"
  627.     else
  628.         frmset.cols="20%,80%"
  629.  
  630.     gOtlOpen=!gOtlOpen
  631.     frm.noResize=!frm.noResize
  632.     UpdOtNavPane()
  633. }
  634. function ToggleNtsPane()
  635. {
  636.     frmset=document.all("PPTVertAdjust")
  637.     frm=document.all("PPTNts")
  638.  
  639.     if( gNtsOpen )
  640.         frmset.rows="100%,*"
  641.     else
  642.         frmset.rows="80%,20%"
  643.  
  644.     gNtsOpen=!gNtsOpen
  645.     UpdNtsPane()
  646. }
  647. function FullScreen(){ window.open( MHTMLPrefix+FULLSCR_HREF,null,"fullscreen=yes" ) }
  648. function ToggleVNarration()
  649. {
  650.     rObj=PPTSld.document.all("NSPlay")
  651.     if( rObj ) {
  652.         if( gNarrationPaused )
  653.             rObj.Play()
  654.         else
  655.             rObj.Pause()
  656.  
  657.         gNarrationPaused=!gNarrationPaused
  658.     }
  659. }
  660. function GetCurSldNum()
  661. {   
  662.     obj=GetHrefObj(gCurSld)
  663.     if( obj.mOrigVis == 1 )
  664.         return obj.mSldIdx
  665.     else   
  666.         return gCurSld
  667. }
  668. function GetNumSlds()
  669. {   
  670.     if( GetHrefObj(gCurSld).mOrigVis == 1 )
  671.         return NUM_VIS_SLDS
  672.     else
  673.         return gDocTable.length
  674. }
  675. function GetSldNum( href )
  676. {
  677.     for(ii=0; ii<gDocTable.length; ii++) {
  678.         if ( gDocTable[ii].mSldHref == href )
  679.             return ii+1
  680.     }
  681.     return 1
  682. }
  683. function GetHrefObj( sldIdx ){ return gDocTable[sldIdx-1] }
  684. function IsFramesMode(){ return ( SCREEN_MODE == "Frames" ) }
  685. function IsFullScrMode(){ return ( SCREEN_MODE == "FullScreen" ) }
  686. function GoToNextSld()
  687. {   
  688.     ii=gCurSld + 1
  689.     if( GetHrefObj( ii-1 ).mOrigVis == 0 ) {
  690.         if( ii<=gDocTable.length ) {
  691.             obj=GetHrefObj(ii)
  692.             obj.mVis=1
  693.             GoToSld(obj.mSldHref)
  694.             return
  695.         }        
  696.     }
  697.     else {
  698.         obj=GetHrefObj( ii )
  699.         while ( obj && ( obj.mOrigVis == 0 ) )
  700.             obj=GetHrefObj(ii++)
  701.         if( obj && obj.mOrigVis ) {
  702.             GoToSld(obj.mSldHref)    
  703.             return
  704.         }    
  705.     }
  706.     if( !IsFramesMode() ) EndShow()
  707. }
  708. function GoToPrevSld()
  709. {
  710.     ii=gCurSld-1
  711.     if( ii > 0 ) {      
  712.         obj=GetHrefObj(ii)
  713.         while ( ( obj.mVis == 0 ) && ( ii>0 ) )
  714.             obj=GetHrefObj(ii--)
  715.         GoToSld(obj.mSldHref)
  716.     }
  717. }
  718. function GoToFirst(){ GoToSld( GetHrefObj(1).mSldHref ) }
  719. function GoToLast()
  720. {
  721.     ii=gDocTable.length
  722.     if( ii != gCurSld )
  723.         GoToSld( GetHrefObj(ii).mSldHref )
  724. }
  725. function GoToSld( href )
  726. {
  727.     if( PPTSld.event ) PPTSld.event.cancelBubble=true
  728.     GetHrefObj( GetSldNum(href) ).mVis=1
  729.     PPTSld.location.href=MHTMLPrefix+href
  730. }
  731. function SldUpdated( id )
  732. {
  733.     if( id == GetHrefObj(gCurSld).mSldHref ) return
  734.     gPrevSld=gCurSld
  735.     gCurSld=GetSldNum(id)
  736.     if( IsFramesMode() ) {
  737.         UpdNavPane(); UpdOtlPane(); UpdNtsPane()
  738.     }
  739. }
  740.  
  741. function PrevSldViewed(){ GoToSld( GetHrefObj(gPrevSld).mSldHref ) }
  742. function HasPrevSld() { return ( gIsEndShow || ( gCurSld != 1 && GetHrefObj( gCurSld-1 ).mVis == 1 )||( GetCurSldNum() > 1 ) ) }
  743. function HasNextSld() { return (GetCurSldNum() != GetNumSlds()) }
  744. function EndShow()
  745. {
  746.     if( PPTSld.event ) PPTSld.event.cancelBubble=true
  747.  
  748.     doc=PPTSld.document
  749.     doc.open()
  750.     doc.writeln('<html><head><script defer>function CloseWindow(){ if( parent.HideMenu() ) return; if( !parent.IsFramesMode() && event && (event.keyCode==27 || event.keyCode==32 || event.type=="click" ) ) parent.window.close( self ); } function Unload() { parent.gIsEndShow=0; } function SetupEndShow() { parent.gIsEndShow=1; document.body.scroll="no"; document.onkeypress=CloseWindow; document.onclick=CloseWindow; document.oncontextmenu=parent._CM; }</script></head><body bgcolor=black onload=SetupEndShow() onunload=Unload()><center><p><font face=Tahoma color=white size=2><br><b>' + ENDSHOW_MESG + '</b></font></p></center></body></html>')
  751.     doc.close()
  752. }
  753. function SetSldVisited(){ gDocTable[gCurSld-1].mVisited=true }
  754. function IsSldVisited(){ return gDocTable[gCurSld-1].mVisited }
  755. function hrefList( sldHref, visible, sldIdx )
  756. {
  757.     this.mSldHref= this.mNtsHref = sldHref
  758.     this.mSldIdx = sldIdx
  759.     this.mOrigVis= this.mVis = visible
  760.     this.mVisited= false
  761. }
  762. var gDocTable = new Array(
  763.    new hrefList("slide0014.htm", 1, 1),
  764.    new hrefList("slide0015.htm", 1, 2),
  765.    new hrefList("slide0016.htm", 1, 3),
  766.    new hrefList("slide0017.htm", 1, 4),
  767.    new hrefList("slide0018.htm", 1, 5),
  768.    new hrefList("slide0019.htm", 1, 6),
  769.    new hrefList("slide0020.htm", 1, 7),
  770.    new hrefList("slide0021.htm", 1, 8),
  771.    new hrefList("slide0022.htm", 1, 9),
  772.    new hrefList("slide0023.htm", 1, 10),
  773.    new hrefList("slide0024.htm", 1, 11),
  774.    new hrefList("slide0025.htm", 1, 12),
  775.    new hrefList("slide0026.htm", 1, 13),
  776.    new hrefList("slide0027.htm", 1, 14),
  777.    new hrefList("slide0028.htm", 1, 15),
  778.    new hrefList("slide0029.htm", 1, 16),
  779.    new hrefList("slide0030.htm", 1, 17),
  780.    new hrefList("slide0031.htm", 1, 18),
  781.    new hrefList("slide0032.htm", 1, 19),
  782.    new hrefList("slide0033.htm", 1, 20),
  783.    new hrefList("slide0034.htm", 1, 21),
  784.    new hrefList("slide0035.htm", 1, 22),
  785.    new hrefList("slide0036.htm", 1, 23),
  786.    new hrefList("slide0037.htm", 1, 24),
  787.    new hrefList("slide0038.htm", 1, 25),
  788.    new hrefList("slide0039.htm", 1, 26),
  789.    new hrefList("slide0040.htm", 1, 27),
  790.    new hrefList("slide0041.htm", 1, 28),
  791.    new hrefList("slide0042.htm", 1, 29),
  792.    new hrefList("slide0043.htm", 1, 30),
  793.    new hrefList("slide0044.htm", 1, 31),
  794.    new hrefList("slide0045.htm", 1, 32),
  795.    new hrefList("slide0046.htm", 1, 33),
  796.    new hrefList("slide0047.htm", 1, 34),
  797.    new hrefList("slide0048.htm", 1, 35),
  798.    new hrefList("slide0049.htm", 1, 36),
  799.    new hrefList("slide0050.htm", 1, 37),
  800.    new hrefList("slide0051.htm", 1, 38),
  801.    new hrefList("slide0052.htm", 1, 39),
  802.    new hrefList("slide0053.htm", 1, 40),
  803.    new hrefList("slide0054.htm", 1, 41),
  804.    new hrefList("slide0055.htm", 1, 42),
  805.    new hrefList("slide0056.htm", 1, 43),
  806.    new hrefList("slide0057.htm", 1, 44),
  807.    new hrefList("slide0058.htm", 1, 45),
  808.    new hrefList("slide0059.htm", 1, 46),
  809.    new hrefList("slide0060.htm", 1, 47),
  810.    new hrefList("slide0061.htm", 1, 48),
  811.    new hrefList("slide0062.htm", 1, 49),
  812.    new hrefList("slide0063.htm", 1, 50),
  813.    new hrefList("slide0064.htm", 1, 51),
  814.    new hrefList("slide0065.htm", 1, 52),
  815.    new hrefList("slide0066.htm", 1, 53),
  816.    new hrefList("slide0067.htm", 1, 54),
  817.    new hrefList("slide0068.htm", 1, 55)
  818. );
  819.  
  820. function ImgBtn( oId,bId,w,action )
  821. {
  822.     var t=this
  823.     t.Perform    = _IBP
  824.     t.SetActive  = _IBSetA
  825.     t.SetInactive= _IBSetI
  826.     t.SetPressed = _IBSetP
  827.     t.SetDisabled= _IBSetD
  828.     t.Enabled    = _IBSetE
  829.     t.ChangeIcon = null
  830.     t.UserAction = action
  831.     t.ChgState   = _IBUI
  832.     t.mObjId   = oId
  833.     t.mBorderId= bId
  834.     t.mWidth   = w
  835.     t.mIsOn    = t.mCurState = 0
  836. }
  837. function _IBSetA()
  838. {
  839.     if( this.mIsOn ) {
  840.         obj=this.ChgState( gHiliteClr,gShadowClr,2 )
  841.         obj.style.posTop=0
  842.     }
  843. }
  844. function _IBSetI()
  845. {
  846.     if( this.mIsOn ) {
  847.         obj=this.ChgState( gFaceClr,gFaceClr,1 )
  848.         obj.style.posTop=0 
  849.     }
  850. }
  851. function _IBSetP()
  852. {
  853.     if( this.mIsOn ) {
  854.         obj=this.ChgState( gShadowClr,gHiliteClr,2 )
  855.         obj.style.posLeft+=1; obj.style.posTop+=1
  856.     }
  857. }
  858. function _IBSetD()
  859. {  
  860.     obj=this.ChgState( gFaceClr,gFaceClr,0 )
  861.     obj.style.posTop=0 
  862. }
  863. function _IBSetE( state )
  864. {
  865.     var t=this
  866.     GetObj( t.mBorderId ).style.visibility="visible"
  867.     if( state != t.mIsOn ) {
  868.         t.mIsOn=state
  869.         if( state )
  870.             t.SetInactive()
  871.         else
  872.             t.SetDisabled()
  873.     }
  874. }
  875. function _IBP()
  876. {
  877.     var t=this
  878.     if( t.mIsOn ) {
  879.         if( t.UserAction != null )
  880.             t.UserAction()
  881.         if( t.ChangeIcon ) {
  882.             obj=GetObj(t.mObjId)
  883.             if( t.ChangeIcon() )
  884.                 obj.style.posLeft=obj.style.posLeft+(t.mCurState-4)*t.mWidth
  885.             else
  886.                 obj.style.posLeft=obj.style.posLeft+(t.mCurState-0)*t.mWidth
  887.         }
  888.         t.SetActive()
  889.     }  
  890. }
  891. function _IBUI( clr1,clr2,nextState )
  892. {
  893.     var t=this
  894.     SetBorder( GetObj( t.mBorderId ),clr1,clr2 )
  895.     obj=GetObj( t.mObjId )
  896.     obj.style.posLeft=obj.style.posLeft+(t.mCurState-nextState)*t.mWidth-obj.style.posTop
  897.     t.mCurState=nextState
  898.     return obj
  899. }
  900. function TxtBtn( oId,oeId,action,chkState )
  901. {
  902.     var t=this
  903.     t.Perform    = _TBP
  904.     t.SetActive  = _TBSetA
  905.     t.SetInactive= _TBSetI
  906.     t.SetPressed = _TBSetP
  907.     t.SetDisabled= _TBSetD
  908.     t.SetEnabled = _TBSetE
  909.     t.GetState   = chkState
  910.     t.UserAction = action
  911.     t.ChgState   = _TBUI
  912.     t.mObjId      = oId
  913.     t.m_elementsId= oeId
  914.     t.mIsOn       = 1
  915. }
  916. function _TBSetA()
  917. {
  918.     var t=this
  919.     if( t.mIsOn && !t.GetState() )
  920.         t.ChgState( gHiliteClr,gShadowClr,0,0 )
  921. }
  922. function _TBSetI()
  923. {
  924.     var t=this
  925.     if( t.mIsOn && !t.GetState() )
  926.         t.ChgState( gFaceClr,gFaceClr,0,0 )
  927. }
  928. function _TBSetP()
  929. {
  930.     if( this.mIsOn )
  931.         this.ChgState( gShadowClr,gHiliteClr,1,1 )
  932. }
  933. function _TBSetD()
  934. {   
  935.     this.ChgState( gFaceClr,gFaceClr,0,0 )
  936.     this.mIsOn = 0
  937. }
  938. function _TBSetE()
  939. {
  940.     var t=this
  941.     if( !t.GetState() )
  942.         t.ChgState( gFaceClr,gFaceClr,0,0 )
  943.     else
  944.         t.ChgState( gShadowClr,gHiliteClr,1,1 )
  945.     t.mIsOn = 1
  946. }
  947. function _TBP()
  948. {
  949.     var t=this
  950.     if( t.mIsOn ) { 
  951.         if( t.UserAction != null )
  952.             t.UserAction()
  953.         if( t.GetState() )
  954.             t.SetPressed()
  955.         else
  956.             t.SetActive()
  957.     }  
  958. }
  959. function _TBUI( clr1,clr2,lOffset,tOffset )
  960. {
  961.     SetBorder( GetObj( this.mObjId ),clr1,clr2 )
  962.     Offset( GetObj( this.m_elementsId ),lOffset,tOffset )
  963. }
  964. function GetObj( objId ){ return document.all.item( objId ) }
  965. function Offset( obj, top, left ){ obj.style.top=top; obj.style.left=left }
  966. function SetBorder( obj, upperLeft, lowerRight )
  967. {
  968.     s=obj.style;
  969.     s.borderStyle      = "solid"
  970.     s.borderWidth      = 1 
  971.     s.borderLeftColor  = s.borderTopColor = upperLeft
  972.     s.borderBottomColor= s.borderRightColor = lowerRight
  973. }
  974. function GetBtnObj(){ return gBtnArr[window.event.srcElement.id] }
  975. function BtnOnOver(){ b=GetBtnObj(); if( b != null ) b.SetActive() }
  976. function BtnOnDown(){ b=GetBtnObj(); if( b != null ) b.SetPressed() }
  977. function BtnOnOut(){ b=GetBtnObj(); if( b != null ) b.SetInactive() }
  978. function BtnOnUp()
  979. {
  980.     b=GetBtnObj()
  981.     if( b != null )
  982.         b.Perform()
  983.     else
  984.         Upd()
  985. }
  986. function GetNtsState(){ return parent.gNtsOpen }
  987. function GetOtlState(){ return parent.gOtlOpen }
  988. function GetOtlTxtState(){ return parent.gOtlTxtExp }
  989. function NtsBtnSetFlag( fVal )
  990. {
  991.     s=document.all.item( this.m_flagId ).style
  992.     s.display="none"
  993.     if( fVal )
  994.         s.display=""
  995.     else
  996.         s.display="none"
  997. }
  998.  
  999. var gHiliteClr="THREEDHIGHLIGHT",gShadowClr="THREEDSHADOW",gFaceClr="THREEDFACE"
  1000. var gBtnArr = new Array()
  1001. gBtnArr["nb_otl"] = new TxtBtn( "nb_otl","nb_otlElem",parent.ToggleOtlPane,GetOtlState )
  1002. gBtnArr["nb_nts"] = new TxtBtn( "nb_nts","nb_ntsElem",parent.ToggleNtsPane,GetNtsState )
  1003. gBtnArr["nb_prev"]= new ImgBtn( "nb_prev","nb_prevBorder",30,parent.GoToPrevSld )
  1004. gBtnArr["nb_next"]= new ImgBtn( "nb_next","nb_nextBorder",30,parent.GoToNextSld )
  1005. gBtnArr["nb_sldshw"]= new ImgBtn( "nb_sldshw","nb_sldshwBorder",18,parent.FullScreen )
  1006. gBtnArr["nb_voice"]  = new ImgBtn( "nb_voice","nb_voiceBorder",18,parent.ToggleVNarration )
  1007. gBtnArr["nb_otlTxt"]= new ImgBtn( "nb_otlTxt","nb_otlTxtBorder",23,parent.ToggleOtlText )
  1008. gBtnArr["nb_nts"].m_flagId= "notes_flag"
  1009. gBtnArr["nb_nts"].SetFlag = NtsBtnSetFlag
  1010. gBtnArr["nb_otlTxt"].ChangeIcon= GetOtlTxtState
  1011. var sNext="Next",sPrev="Previous",sEnd="End Show",sFont="Arial"
  1012. function ShowMenu()
  1013. {
  1014.     BuildMenu();
  1015.     var doc=PPTSld.document.body,x=PPTSld.event.clientX+doc.scrollLeft,y=PPTSld.event.clientY+doc.scrollTop
  1016.  
  1017.     m = PPTSld.document.all.item("ctxtmenu")
  1018.     m.style.pixelLeft=x
  1019.     if( (x+m.scrollWidth > doc.clientWidth)&&(x-m.scrollWidth > 0) )
  1020.         m.style.pixelLeft=x-m.scrollWidth
  1021.  
  1022.     m.style.pixelTop=y
  1023.     if( (y+m.scrollHeight > doc.clientHeight)&&(y-m.scrollHeight > 0) )
  1024.         m.style.pixelTop=y-m.scrollHeight
  1025.  
  1026.     m.style.display=""
  1027. }
  1028. function _CM()
  1029. {
  1030.     if( !parent.IsFullScrMode() ) return;
  1031.     if(!PPTSld.event.ctrlKey) {
  1032.         ShowMenu()
  1033.         return false
  1034.     } else
  1035.         HideMenu()
  1036. }
  1037. function BuildMenu()
  1038. {
  1039.     if( PPTSld.document.all.item("ctxtmenu") ) return
  1040.  
  1041.     var mObj=CreateItem( PPTSld.document.body )
  1042.     mObj.id="ctxtmenu"
  1043.     var s=mObj.style
  1044.     s.position="absolute"
  1045.     s.cursor="default"
  1046.     s.width="100px"
  1047.     SetCMBorder(mObj,"menu","black")
  1048.  
  1049.     var iObj=CreateItem( mObj )
  1050.     SetCMBorder( iObj, "threedhighlight","threedshadow" )
  1051.     iObj.style.padding=2
  1052.     CreateMenuItem( iObj,sNext,M_GoNextSld,M_True )
  1053.     CreateMenuItem( iObj,sPrev,M_GoPrevSld,M_HasPrevSld )
  1054.     var sObj=CreateItem( iObj )
  1055.     SetCMBorder(sObj,"menu","menu")
  1056.     var s=sObj.style
  1057.     s.borderTopColor="threedshadow"
  1058.     s.borderBottomColor="threedhighlight"
  1059.     s.height=1
  1060.     s.fontSize="0px"
  1061.     CreateMenuItem( iObj,sEnd,M_End,M_True )
  1062. }
  1063. function Highlight() { ChangeClr("activecaption","threedhighlight") }
  1064. function Deselect() { ChangeClr("threedface","menutext") }
  1065. function Perform()
  1066. {
  1067.     e=PPTSld.event.srcElement
  1068.     if( e.type=="menuitem" && e.IsActive() )
  1069.         e.Action()
  1070.     else
  1071.         PPTSld.event.cancelBubble=true
  1072. }
  1073. function ChangeClr( bg,clr )
  1074. {
  1075.     e=PPTSld.event.srcElement
  1076.     if( e.type=="menuitem" && e.IsActive() ) {
  1077.         e.style.backgroundColor=bg
  1078.         e.style.color=clr
  1079.     }
  1080. }
  1081.  
  1082. function M_HasPrevSld() { return( parent.HasPrevSld() ) }
  1083. function M_GoNextSld() { if( gIsEndShow ) M_End(); else GoToNextSld() }
  1084. function M_GoPrevSld() { if( gIsEndShow ) { history.back(); PPTSld.event.cancelBubble=true; } else GoToPrevSld() }
  1085. function M_True() { return true }
  1086. function M_End() { window.close( self ) }
  1087. function CreateMenuItem( node,text,action,eval )
  1088. {
  1089.     var e=CreateItem( node )
  1090.     e.type="menuitem"
  1091.     e.Action=action
  1092.     e.IsActive=eval
  1093.     e.innerHTML=text
  1094.  
  1095.     if( !e.IsActive() )
  1096.         e.style.color="threedshadow"
  1097.     e.onclick=Perform
  1098.     e.onmouseover=Highlight
  1099.     e.onmouseout=Deselect
  1100.     s=e.style;
  1101.     s.fontFamily=sFont
  1102.     s.fontSize="8pt"
  1103.     s.paddingLeft=2
  1104. }
  1105. function CreateItem( node )
  1106. {
  1107.     var elem=PPTSld.document.createElement("DIV")
  1108.     node.insertBefore( elem )
  1109.     return elem
  1110. }
  1111. function SetCMBorder( o,ltClr,rbClr )
  1112. {
  1113.     var s=o.style
  1114.     s.backgroundColor="menu"
  1115.     s.borderStyle="solid"
  1116.     s.borderWidth=1
  1117.     s.borderColor=ltClr+" "+rbClr+" "+rbClr+" "+ltClr
  1118. }